package com.gsm.controller;

import com.gsm.dto.LoginUserDto;
import com.gsm.entity.Result;
import com.gsm.service.LoginService;
import com.gsm.vo.LoginUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@RestController
@RequestMapping("adminLogin")
public class LoginController {
    @Autowired
    private LoginService loginService;

    @PostMapping("user")
    public Result selectUserInfo(@Valid @RequestBody LoginUserDto dto) {
        LoginUserVo vo = loginService.selectUserInfo(dto);
        return Result.success(vo);
    }

}
